//$URL: http://dasding.googlecode.com/svn/tags/dasding-0.1/data/src/main/java/de/piratech/dasding/data/Event.java $
//$Id: Event.java 26 2012-10-07 23:22:51Z amuthmann@gmail.com $
/*
 * Copyright 2012 Piratech.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.piratech.dasding.data;

import java.util.Collections;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * An event
 *
 * @author deveth0
 */
@XmlRootElement
public class Event extends AbstractAction {

  public enum EVENTSTATUS {

    ACTIVE,
    CANCELED,
    FINISHED
  }
  private List<Action> actions;
  private List<User> prospects;
  private EVENTSTATUS status;
//  private Event predecessor;

  @XmlElementWrapper
  @XmlElement(name = "action")
  public List<Action> getActions() {
    return Collections.unmodifiableList(actions);
  }

  public void setActions(List<Action> actions) {
    this.actions = actions;
  }

  @XmlElementWrapper
  @XmlElement(name = "user")
  public List<User> getProspects() {
    return Collections.unmodifiableList(prospects);
  }

  public void setProspects(List<User> prospects) {
    this.prospects = prospects;
  }

  public EVENTSTATUS getStatus() {
    return status;
  }

  public void setStatus(EVENTSTATUS status) {
    this.status = status;
  }
//  public Event getPredecessor() {
//    return predecessor;
//  }
//
//  public void setPredecessor(Event predecessor) {
//    this.predecessor = predecessor;
//  }
}
